package com.es.disped.dao.mapper;

import com.es.disped.dao.model.LoggingEventException;
import com.es.disped.dao.model.LoggingEventExceptionExample;
import com.es.disped.dao.model.LoggingEventExceptionKey;
import java.util.List;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

//@CacheNamespace(implementation=(com.es.disped.dao.cache.RedisCache.class),size=512,flushInterval=60000)
public interface LoggingEventExceptionMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_exception
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=LoggingEventExceptionSqlProvider.class, method="countByExample")
    long countByExample(LoggingEventExceptionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_exception
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @DeleteProvider(type=LoggingEventExceptionSqlProvider.class, method="deleteByExample")
    int deleteByExample(LoggingEventExceptionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_exception
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Delete({
        "delete from logging_event_exception",
        "where event_id = #{eventId,jdbcType=BIGINT}",
          "and i = #{i,jdbcType=SMALLINT}"
    })
    int deleteByPrimaryKey(LoggingEventExceptionKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_exception
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Insert({
        "insert into logging_event_exception (event_id, i, ",
        "trace_line)",
        "values (#{eventId,jdbcType=BIGINT}, #{i,jdbcType=SMALLINT}, ",
        "#{traceLine,jdbcType=VARCHAR})"
    })
    int insert(LoggingEventException record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_exception
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @InsertProvider(type=LoggingEventExceptionSqlProvider.class, method="insertSelective")
    int insertSelective(LoggingEventException record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_exception
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=LoggingEventExceptionSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="i", property="i", jdbcType=JdbcType.SMALLINT, id=true),
        @Result(column="trace_line", property="traceLine", jdbcType=JdbcType.VARCHAR)
    })
    List<LoggingEventException> selectByExample(LoggingEventExceptionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_exception
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Select({
        "select",
        "event_id, i, trace_line",
        "from logging_event_exception",
        "where event_id = #{eventId,jdbcType=BIGINT}",
          "and i = #{i,jdbcType=SMALLINT}"
    })
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="i", property="i", jdbcType=JdbcType.SMALLINT, id=true),
        @Result(column="trace_line", property="traceLine", jdbcType=JdbcType.VARCHAR)
    })
    LoggingEventException selectByPrimaryKey(LoggingEventExceptionKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_exception
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=LoggingEventExceptionSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") LoggingEventException record, @Param("example") LoggingEventExceptionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_exception
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=LoggingEventExceptionSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") LoggingEventException record, @Param("example") LoggingEventExceptionExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_exception
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=LoggingEventExceptionSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(LoggingEventException record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_exception
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Update({
        "update logging_event_exception",
        "set trace_line = #{traceLine,jdbcType=VARCHAR}",
        "where event_id = #{eventId,jdbcType=BIGINT}",
          "and i = #{i,jdbcType=SMALLINT}"
    })
    int updateByPrimaryKey(LoggingEventException record);
}